Skip to content

Fix - Tabs component#446

Merged
enguerranws merged 2 commits into
mainfrom
fix/tabs-component-with-async-tabs
Dec 11, 2025
Merged

Fix - Tabs component#446
enguerranws merged 2 commits into
mainfrom
fix/tabs-component-with-async-tabs

Conversation

@enguerranws

@enguerranws enguerranws commented Sep 12, 2025

Copy link
Copy Markdown
Collaborator

I noticed that at certain times, when we have tabs loaded asynchronously, the selected tab is not the correct one. For example, if we have 3 tabs, the second one is loaded asynchronously, and we have selected the third one, in the end, the second tab is the one selected in the interface.

I made a more simple approach (using useMemo instead of useState + useEffect), which works fine with both sync and async generated tabs.

@enguerranws enguerranws self-assigned this Sep 12, 2025
@enguerranws enguerranws changed the title fix/tabs component with async tabs Fix - Tabs component Sep 12, 2025
@enguerranws
enguerranws force-pushed the fix/tabs-component-with-async-tabs branch from eb800a8 to ae2e642 Compare September 12, 2025 09:13
@enguerranws
enguerranws merged commit 59d709c into main Dec 11, 2025
6 checks passed
@garronej

Copy link
Copy Markdown
Collaborator

Can't beleve I wrote such shit code. Thank you for the fix @enguerranws!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants